package com.three.lab.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class ClassifyChildBean implements Parcelable {

    private int pid;
    private String pname;
    private int id;
    private List<GoodsBean> goodsBeanList;

    public ClassifyChildBean() {
    }

    public ClassifyChildBean(int pid, String pname, int id, List<GoodsBean> goodsBeanList) {
        this.pid = pid;
        this.pname = pname;
        this.id = id;
        this.goodsBeanList = goodsBeanList;
    }

    protected ClassifyChildBean(Parcel in) {
        pid = in.readInt();
        pname = in.readString();
        id = in.readInt();
        goodsBeanList = in.createTypedArrayList(GoodsBean.CREATOR);
    }

    public static final Creator<ClassifyChildBean> CREATOR = new Creator<ClassifyChildBean>() {
        @Override
        public ClassifyChildBean createFromParcel(Parcel in) {
            return new ClassifyChildBean(in);
        }

        @Override
        public ClassifyChildBean[] newArray(int size) {
            return new ClassifyChildBean[size];
        }
    };

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<GoodsBean> getGoodsBeanList() {
        return goodsBeanList;
    }

    public void setGoodsBeanList(List<GoodsBean> goodsBeanList) {
        this.goodsBeanList = goodsBeanList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(pid);
        dest.writeString(pname);
        dest.writeInt(id);
        dest.writeTypedList(goodsBeanList);
    }
}
